<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="dist/vue.js"></script>
</head>
<body>
    <div id="app">
        <input type="text" v-focus>
        <input type="text" v-focus>
        <input type="text" v-focus>

    </div>    
    <div id="app2">
        <input type="text" v-focus>
    </div>
</body>
<script>
    new Vue( {
        el: '#app',
        directives: {
            'focus' : {
                inserted(el) {
                    el.focus()
                }
            }
        }
    })
</script>
</html>